Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ltmpl: Handle installing provides with filter_provides #1373

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

bcl
Copy link
Contributor

@bcl bcl commented Jan 29, 2024

Switch to using resolve_pkg_spec function.

@bcl
Copy link
Contributor Author

bcl commented Jan 29, 2024

Workaround for #1372

@coveralls
Copy link

coveralls commented Jan 29, 2024

Pull Request Test Coverage Report for Build 7744828460

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • -1 of 9 (88.89%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.1%) to 43.339%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/pylorax/ltmpl.py 8 9 88.89%
Files with Coverage Reduction New Missed Lines %
src/pylorax/ltmpl.py 1 55.24%
Totals Coverage Status
Change from base Build 7744813575: -0.1%
Covered Lines: 1608
Relevant Lines: 3496

💛 - Coveralls

@bcl bcl force-pushed the master-provides branch from 6ba7583 to f9d5223 Compare January 30, 2024 23:35
@bcl
Copy link
Contributor Author

bcl commented Jan 30, 2024

Ends up there's a function for all this! So now this mostly is just a pass-thru to dnf5, including the version comparisons.

@bcl
Copy link
Contributor Author

bcl commented Jan 31, 2024

Unit tests passed, but didn't get reported for some reason. coverage change isn't a big deal.

Previously the installpkg command used filter_match to select packages,
which works great most of the time. It fails when the package is only
available as a provide. This happened recently with wget moving to
wget2-wget, causing builds to fail because it couldn't find wget.

This changes installpkg to use the resolve_pkg_spec function, which as
it happens also support globs and version comparison operators. DNF
doesn't like the `==` operator, but I have retained support for it by
translating it to a single `=`. I have dropped support for `=>` and `=<`
since they are never used and are and odd way to specify `>=` and `>=`
which of course still work.
@bcl bcl force-pushed the master-provides branch from f9d5223 to 20dde99 Compare February 1, 2024 16:57
@bcl bcl merged commit 20dde99 into weldr:master Feb 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants